from rest_framework.serializers import ModelSerializer

from course.models import Tag, Category, Course, Chapter, Knob
class KnobSer(ModelSerializer):
    class Meta:
        model = Knob
        fields = "__all__"

class TagSer(ModelSerializer):
    class Meta:
        model = Tag
        fields = "__all__"

class ChapterSer(ModelSerializer):
    knob_set = KnobSer(many=True)
    class Meta:
        model = Chapter
        fields = "__all__"

class CourseSer(ModelSerializer):
    chapter_set = ChapterSer(many=True)
    class Meta:
        model = Course
        fields = "__all__"


class CategorySer(ModelSerializer):
    class Meta:
        model = Category
        fields = "__all__"




class CourseSer1(ModelSerializer):
    class Meta:
        model = Course
        fields = "__all__"


